package com.ty.dao;

import java.util.List;

import cn.smart.core.annotation.PageX;
import com.ty.entity.InventoryBatchQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.domain.Pageable;
import com.ty.entity.InventoryBatch;

 /**
 * 商品批次库存详细表;(212_inventory_batch)表数据库访问层
 * @author : heimi
 * @date : 2025-6-9
 */
@Mapper
public interface InventoryBatchDao{
    @PageX
    List<InventoryBatch> select(InventoryBatchQuery query);
    Integer insert(InventoryBatch inventoryBatch);
    Integer insertBatch(List<InventoryBatch> inventoryBatchs);
    Integer update(InventoryBatch inventoryBatch);
    Integer delete(Integer id);
    @Update("update `212_inventory_batch` set qty = qty + #{optionQty} where batchid = #{batchid}")
    Integer updateBatchQty(String batchid ,Integer optionQty);
}